home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Digital Talk 53
/
Digital_Talk_53_2002-02-11_Digital_Talk_de_Side_A.d64
/
bubble & dimond
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
11KB
|
419 lines
10 :goto5000:rem---run :
11 :goto3300:rem---edit:
20 :a$="bubble & dimond":open1,8,15,"s:"+a$:close1:savea$,8:return
21 :
22 :
46 :deffn as(a)=a+(a>63)*64-(a>95anda<128)*32+(a>191)*64+(a=255)*33
97 :
98 :
99 :====================================
100 :rem-----set-cursor(p)
101 :poke214,p:poke211,(p-int(p))*101:sys58640:return
102 :p=peek(214)+pos(.)/100:return
103 :a=53265:pokea,27-(peek(a)and16):return:
104 :poke53265,11:zz=(fnr(8)-1)*30+10:ti$="000000":return:
105 :poke53265,27:zz=.1:return:
106 :
107 :
110 :rem---- restore adresse(a) ----
111 :poke66,int((a-1)/256):poke65,a-peek(66)*256-1:return:
112 :deffnl(a)=peek(61)+peek(62)*256+1:::return: ---syntax:: a=fnl(.):gosub80
113 :
114 :fori=.to(peek(162)and8):a=fnr(i):next:return:---random set
115 :
120 :rem----string-gen(a$,l)
121 :a$=a$+a$:on-(len(a$)*2<l)goto121:a$=a$+left$(a$,l-len(a$)):return
122 :
130 :rem----sreen-init
131 :poke58718,96:sys58692:poke58718,162:return
132 :
140 :rem----joystick & tasten-abfrage
141 :geta$:j=31-peek(jo)and31:ifzz>.1then:on-(ti>zz)gosub105:
142 :on-(j=.anda$="")goto141:ifa$then:return
143 :ifjand1then:a$="[145]":return
144 :ifjand2then:a$="":return
145 :ifjand4then:a$="[157]":return
146 :ifjand8then:a$="":return
147 :ifjand16then:a$=r$:return
148 :return
149 :
299 :
300 :rem----schirm-check(a):
301 :fori=atoa+961:j=peek(i):d(j)=d(j)+1:next:return
360 :j=128:fori=.to7:printmid$(".*",1-((aandj)>.),1);:j=j/2:next:return
996 :
997 :
998 :
999 :
1000 :rem==============================
1001 :rem
1002 :rem spiel
1003 :rem
1004 :rem==============================
1005 :
1100 :rem---steuerung
1110 :fori=.togs+fnr(gw):next:print" [157]"a$;fi$;
1111 :gosub140:
1112 :ifa$=""then:ifx<39then:x=x+1:c=1:goto1130
1113 :ifa$="[157]"then:ifx>.then:x=x-1:c=-1:goto1130
1114 :ifa$="[145]"then:ify>.then:y=y-1:c=-40:goto1130
1115 :ifa$=""then:ify<24then:y=y+1:c=40:goto1130
1120 :on1-(a$="[133]")-2*(a$="[148]")goto1111,1200,3300:
1129 :
1130 :rem----bewegungen pruefen
1132 :p=fnp(c):ifzz=.1then:onfnr(zt)gosub104
1133 :on-(p=32)goto1110:ifp=fgthen:di=di+1:goto1110
1134 :ifp=197goto1150:--ende
1135 :ifz<3then:x=x+(c=1)-(c=-1):y=y+(c=40)-(c=-40):goto1111:---kein anstossen
1136 :
1137 :
1138 :
1150 :rem---abbruch und ende -----
1151 :poke53265,27:print"[146] [157]"a$fi$;:c=p
1152 :gosub130:p=24.11:gosub100:on1-(c=197)goto1160
1154 :print"*** [199][197][211][195][200][193][198][198][212] ***";:gosub1600:r=0:goto1200
1160 :r=2:ifz<5then:print" [213][197][194][197][210][199][197][212][210][197][212][197][206] ";:gosub1620:goto1200
1161 :print"[157]* [196][193][211] [215][193][210] [196][193][211] [197][206][196][197] *";:gosub1620:goto1200
1198 :
1199 :
1200 :rem----punktberechnung
1210 :di=di+r*di*(z>3):d=pk:pk=pk+di
1211 :r=(r=2andz>4):pk(.)=pk:lv(.)=lv
1212 :if(a$="[133]")then:on1-(pk=.)goto1221,4000:
1213 :gosub140:if(r<.)and(a$="[136]"ora$="[140]"ora$="")goto2000:
1217 :
1219 :
1220 :rem----punktanzeige
1221 :a$=mid$("[150][159][154]",fnr(4),1)
1222 :gosub130:print"[146]"a$;:p=5.02:h=14:l=34:d$=" [146][150]":gosub1500
1223 :print"[158][211][212][213][198][197][146]:[158]"mid$(str$(z),2)tab(23)"[204][197][214][197][204][146]:[158]"mid$(str$(lv),2)
1224 printtab(c+2)"[181][181][181][158][146][208][213][206][203][212][218][193][200][204]:[146][158]"d"[157] "
1225 printtab(c+2)"[181][181][181][158][146][196][201][193][205][193][206][212][197][206]:[146][158]"di"[157] [145][145][145][145][145]":
1226 :fori=1to1500:next:fori=dtopkstepsgn(di):poke211,c+20:printi"[157] ";:next
1227 :pk=fnk(pk)
1229 :
1240 :gosub140:if(r<.)and(a$=""ora$="[136]"ora$="[140]")goto2000
1241 :on1-(a$="[133]"ora$="[157]"orr<.)goto2011
1242 :poke60138,16:poke60189,4:goto4000:
1498 :
1499 :
1500 :rem----window(p,l,h,d$)
1501 :a$="[185]":gosub120:b$=a$:a$="[184]":gosub120:gosub100:c=pos(.):pokesp,asc(d$)
1502 :f$=chr$(fns(.)):d$=right$(d$,2):print"[146] "a$"[146] ":poke211,c
1503 :fori=3toh:printf$"[146] [146]"d$spc(l-2)f$" [146] ":poke211,c:next:
1504 :print"[146] "b$"[146] ";:pokesp,29::p=p+1.02:c=(p-int(p))*101:gosub100:return
1505 :
1506 :l=5:h=5:p=15.6:gosub200:end
1507 :
1508 :
1599 :
1600 :a=4:rem---flimmern
1601 :a=(a+fnr(a))*40:
1602 :poke198,0:b=peek(53280):fori=.toa:poke53280,iand15:i=i+peek(198)*a:next:
1603 :poke53280,b:return
1604 :
1605 :
1620 :rem---wackeln(a)
1621 :fori=1to255:poke53270,iand15:next
1622 :poke53270,200:return
1623 :
1624 :
1996 :
1997 :
1998 :
1999 :
2000 :rem==============================
2001 :rem
2002 :rem bild-aufbau
2003 :rem
2004 :rem==============================
2005 :
2010 :poke53280,4:poke53281,12:print"[152][147]";::pk=.:lv=.:z0=-(z=9)*9:
2011 :gosub114:gosub2040:
2012 :a$=mid$("[150][159][155]",fnr(3),1):a=fnr(2):on(a)gosub2020,2033:
2013 :a$=mid$("[159][150][155]",fnr(3),1):on(a)gosub2030,2021:
2014 :geta$:gosub5500:on-(a$="[133]")goto1200:goto2050
2015 :
2016 :
2020 :print"[152][147]";:rem----rahmen
2021 :a$=mid$("[150][154][155][159]",fnr(5),1):
2022 :gosub130:poke217+25,7
2023 :printa$""left$(l1$,9)"[158] [200][197][210][218][197][206] & [196][201][193][205][193][206][212][197][206] "a$right$(l1$,9)
2024 :print""l2$"[157]"l2$;:poke214,23:printr$""l1$;::gosub130:return:
2025 :
2026 :
2030 :rem----schirm fuellen
2032 :f$=a$:print"[146]"a$;:gosub2042:l=38:b=23:gosub2800:return
2033 :f$=a$:printa$;:gosub2042:pokebl,hg:print"[147]";:pokebl,32:return:
2038 :
2039 :
2040 :rem----modus einstellen
2041 :lv=fnk(lv+1):ifz0then:z=lv*-(lv<9)+fnr(8)*-(lv>8)
2042 :
2043 :hg=102:a$="[166]":m=5:
2044 :ifz=6orz=8or((fnm(lv)=.)andlv>10andz>1)then:hg=96:a$="[160]"
2045 :m=4:zz=-(z>6or(z>1andlv>19andfnm(lv)=.))*.1:zt=10+fnr(10):return:
2046 :
2050 :rem---wege aufbauen
2051 :gosub2820:a=fnr(5):ifa=1then:print"[153][146]";:a$="[181]"
2052 :ifa=2then:print"[146]";:a$="[179]"
2053 :ifa=3then:print"[146]";:a$="[176]"
2054 :ifa=4then:print"[158][146]";:a$="[177]"
2055 :ifa=5then:print"[153][146]";:a$="[180]"
2056 :
2060 :v=fnr(3)+3*-(lv<5):a=(40+fnr(80))/(v*.7)+v*v*-(v<6)
2061 :gosub2830:printa$"[157]";:fg=fnp(.)
2062 :
2064 :rem---end setzen
2065 :if(fnp(.)<>hg)then:l=1:a$="":k=fnr(4):gosub2810:goto2065:
2066 :print"[197]";:p=y+x/100:gosub100:gosub130:
2067 :
2070 :rem---figur install
2071 :a=l(fnr(3))
2072 :gosub110:gosub5804
2074 :
2080 :s=.:di=.:a$="":poke198,1:goto1000
2097 :
2098 :
2099 :
2800 :rem----quadrate ausgeben(l,b,a$)
2802 :a=pos(.):gosub120:forj=1tob:poke211,a:printa$"[157]";:next:print"[145]";:return
2804 :
2805 :
2810 :rem----linien-ausgabe(a$,k,l)-----
2811 :ifk=1then:if(x1+l<38)then:x1=x1+l:b$="":goto2816
2812 :ifk=2then:if(x1-l>1)then:x1=x1-l:b$="[157][157]":goto2816
2813 :ifk=3then:if(y1+l<24)then:y1=y1+l:b$="[157]":goto2816
2814 :ifk=4then:if(y1-l>1)then:y1=y1-l:b$="[157][145]":goto2816
2815 :k=.:return
2816 :b$=a$+b$:fori=1tol:printb$;:next:return
2817 :
2818 :
2820 :rem----start-punkt-suchen
2821 :k=fnr(2):x=fnr(38):y=fnr(23):
2822 :ifk=1then:x1=x:y1=-(y>12)*24:ify<24and(x>8andx<32)goto2820
2823 :ifk=2then:y1=y:x1=-(x>19)*39:
2824 :x=x1:y=y1:y1=y1-(1+(y1>20)*2)*(k=1):x1=x1-(1+(x1>30)*2)*(k=2)
2825 :return
2827 :
2828 :
2830 :rem----zufalls-linien(x1,y1)
2831 :p=y1+x1/100:gosub100:gosub130
2832 :forh=1toa:gosub2834:next:return
2833 :
2834 :k=fnr(4):l=fnr(38/v)*v:gosub2810:on-(k=.)goto2834:return
2996 :
2997 :
2998 :
2999 :
3000 :rem==============================
3001 :rem
3002 :rem titel-menue
3003 :rem
3004 :rem==============================
3005 :
3100 :pokebl,228:poke53280,12:print"[150][147]":poke53281,5:pokebl,32:
3120 :pokesp,191:poke214,10:print"[155]"spc(40);:pokesp,29
3121 :print"[145]"tab(4)"[153] [199]:"mid$(str$(gs),2)" "tab(29)" [215]:"mid$(str$(gw),2)" "
3122 :
3130 :print"[211]ammeln[211]iedie[196]iamantenauf."
3131 :print"[194]eruehren[211]iedabeiabernichtdie"
3132 :print"[215]aende."
3133 :print"[204]eertastezeigtdie[214]ergleichstafel,"
3134 :print"[198]1bringt[211]iezurueckindies[205]enue."
3139 :
3140 :print"(1-2)einfach(5-8)[208]rofis"
3141 :print"(3-4)[203]oenner( 9 )gemischt";
3149 :
3150 :p=1.04:a$="[159][194][204][193][211][197][206]&":gosub3400:
3151 :p=6.02:a$="[158][196][201][193][205][193][206][212][197][206]":gosub3408
3160 :
3198 :
3199 :
3200 :gosub140::on-(a$=r$ora$="[136]"ora$="[140]")-2*(a$=" "ora$="")goto2000,4000
3210 :a=val(a$):if(a)then:z=a:goto2000
3211 :a=(a$="[199]"andgs>.)-(a$="g"):ifa$="_"then:run
3212 :ifathen:gs=gs+a*5:p=11.07:gosub100:print"[153]"mid$(str$(gs),2)" [155][146][191]";
3213 :a=(a$="[215]"andgs>.)-(a$="w")
3214 :ifathen:gw=gw+a*5:p=11.32:gosub100:print"[153]"mid$(str$(gw),2)" [155][146][191]";
3220 :ifa$="\"then:open1,8,15:close1:on-(st=.)gosub20:goto3000:
3250 :ifa$<>"[148]"goto3200:
3299 :
3300 :rem---edit
3301 :print"[147]edit":sys64789:sys58451:sys42107:
3302 :
3303 :
3304 :
3305 :
3400 :rem zeichenausgabe (4x4) ---------------------
3401 :b$="[157][157][157][157]":c$="[145][145][145]":
3402 :a$(.)="[146] ":a$(1)="[146][190]":a$(2)="[146][188]":a$(3)="[162]":a$(4)="[146][187]":a$(5)="[146][161]"
3403 :a$(6)="[191]":a$(7)="[172]":a$(8)="[146][172]":a$(9)="[146][191]":a$(10)="[161]":a$(11)="[187]"
3404 :a$(12)="[146][162]":a$(13)="[188]":a$(14)="[190]":a$(15)=" "
3405 :rem---konstanten
3406 :zs=53248+2048*1:b1=1:b2=2:b3=4:b4=8:b5=16:b6=32:b7=64:b8=128
3407 :
3408 :rv=.:gosub100:forj=1tolen(a$):a=asc(mid$(a$,j)):gosub3410:next:return
3409 :
3410 :rem---ausgabe(4x4)
3411 ifa<32or(a>127anda<160)then:rv=(rvor-(a=18))*-(a<>146):printchr$(a);:return
3412 :b=zs+fnas(a)*8+rv*1024:c=peek(1):
3413 :poke56334,.:poke1,51:fori=.to7:a(i)=peek(b+i):next:poke1,c:poke56334,1:
3414 :d$=b$:fori=.to7step2:b=a(i):a=a(i+1):ifi=6then:d$=c$
3415 :printa$(sgn(bandb8)*1+sgn(bandb7)*2+sgn(aandb8)*4+sgn(aandb7)*8);
3416 :printa$(sgn(bandb6)*1+sgn(bandb5)*2+sgn(aandb6)*4+sgn(aandb5)*8);
3417 :printa$(sgn(bandb4)*1+sgn(bandb3)*2+sgn(aandb4)*4+sgn(aandb3)*8);
3418 :printa$(sgn(bandb2)*1+sgn(bandb1)*2+sgn(aandb2)*4+sgn(aandb1)*8)d$;:next
3419 :return
3997 :
3998 :
3999 :
4000 :rem==============================
4001 :rem
4002 :rem vergleichstafel
4003 :rem
4004 :rem==============================
4005 :
4100 :pokebl,227:poke53280,12:
4101 :print"[155][147][214][197][210][199][204][197][201][195][200][211][212][193][198][197][204]":poke53281,10:pokebl,32:
4102 :poke214,23:print:print"[153][211]peichern([211])"tab(16)"[204]aden([204])";
4103 :printtab(27)"[204]oeschen(_)[146][158]";
4110 :vg=.:z=z*-(z0=.)+z0:ifpk>pk(z)then:pk(z)=pk:lv(z)=lv:vg=1
4120 :p=2.01:h=21:l=36:d$=" [146][155]":gosub1500
4121 :ifvgthen:p=22.09:gosub100:print" [196]as ist ein [210]ekord ";
4122 :d=z:gosub4140:ifvgthen:a=4:gosub1601
4123 :goto4200:
4139 :
4140 :a=4:e=37:print"":
4141 :fori=1to9:poke211,a:poke19,1
4142 :print"[211]tufe:[146]"i"[157],"lv(i)tab(19)"[208]unkte:[146]"pk(i)"[157]"d$tab(e);
4143 printleft$("[157][157][157]<<<",-(d=i)*8)r$:poke19,.:next
4144 :printtab(a)"[211]tufe:[146]"z"[157],"lv;tab(19)"[208]unkte:[146]"pk""d$tab(e);
4145 :p=d*2+1+.34:gosub100:return
4199 :
4200 :gosub140:rem---tasten
4201 :ifa$=chr$(20)ora$="[157]"then:pk(d)=.:lv(d)=.:vg=vg+(z=d):gosub4140:goto4200
4202 :ifa$="l"then:gosub4400:gosub4140:goto4200
4203 :ifa$="s"then:gosub4500:gosub4140:goto4200
4205 :ifa$=""then:a=1:on1-(d<9)goto4200,4220:
4206 :ifa$="[145]"then:a=-1:on1-(d>1)goto4200,4220:
4207 :if(a$=r$ora$="[136]"ora$="[140]")then:z=d:goto2000
4215 :on-(val(a$)>.)goto3210:goto3000
4216 :
4220 :d=d+a:printd$" [157][157][157]"a$a$"<<<[157][157][157]";:goto4200
4221 :
4400 :rem----tabelle laden
4401 :a$="":gosub4800:iffthen:return:
4402 :open1,8,.,nt$+",s,r":fori=1to10:input#1,pk(i),lv(i):next:input#1,gs,gw
4403 :close1:vg=.:return:
4404 :
4500 :rem----tabelle speichern
4501 :gosub4800:on-(f<.)goto4503::open1,8,15,"s:"+nt$:close1
4502 :open1,8,1,"@0:"+nt$+",s,w":fori=1to10:print#1,pk(i)r$lv(i):next:
4503 :print#1,gs;r$;gw:close1
4504 :return:
4602 :
4800 :rem---floppy check
4801 :poke768,61:open1,8,.,nt$+",s,r":close1:poke768,139:ifstthen:f=-1:return:
4802 :open1,8,15:input#1,f:close1:return:
4803 :
4804 :
5000 :rem==============================
5001 :rem "
5002 :[143] voreinstellungen "
5003 :rem "
5004 :[143]==============================
5005 :[141]9999:[141]5700:
5006 :
5007 :
5030 :[153]"load ascrei-(NULL)oft fuer (NULL)pieleliebhaber"
5031 :[153]" ascree-(NULL)oft for chr$amelovers"
5032 :[153]"tan(NULL)tanwaitstr$.peekreitingertan(NULL)tanwait (2001)"
5033 :[151]42926,44:[129]i[178]1[164]3000:[130]:
5034 :
5035 :
5050 :[143]----zeichen inst.
5051 :[141]5800:[141]5830:
5052 :
5053 :
5100 :[143]---funktionen :
5101 :[150][165] r(a)[178][181]([187](1)[172]a[171](a[177].))
5102 :[150][165] p(a)[178][194]([194](209)[170][194](210)[172]256[170][185](.)[170]a)::[141]112
5103 :[150][165] s(a)[178][194](59610[170]([194](646)[175]15))
5104 :[150][165] k(a)[178][197]([196](a)):
5105 :[150][165] m(a)[178]a[171][181](a[173]m)[172]m:
5106 :[150][165] as(a)[178]a[170](a[177]63)[172]64[171](a[177]95[175]a[179]128)[172]32[170](a[177]191)[172]64[170](a[178]255)[172]33
5107 :
5109 :
5200 :[143]---variablen :
5205 :nt$[178]"--bu+di+bu+di---":[141]4400
5206 :[134] d(256),a$(16),b$(16)
5209 :
5210 :br[178]([194](210)[175]252)[172]256:fr[178]([194](244)[175]252)[172]256:jo[178]56320:
5211 :vn[178][171]([194](59911)[178]32):bl[178]59912[170]vn[172]3:sp[178]43843:gn[178][194](123):a[178][187]([171]ti)
5212 :
5300 :a$[178]" then":l[178]39:[141]120:l1$[178]a$[170]" "
5301 :a$[178]"tocmd":l[178]69:[141]120:l2$[178]a$
5302 :r$[178][199](13):fi$[178]"waitsys@cmd"
5400 :z[178]9:[151]649,1:[151]652,2:[141]5510:[137]3000:
5500 :[143]----anzeigen
5501 :[139]lv[178]1[167]:a$[178]"list(NULL)tufewait:sys"[170][202]([196](z),2):[137]5505
5502 :m[178]10:m[178][165]m(lv):[139]m[178]3[176]m[178]7[167]:a$[178]"sys"[170]b$([165]r(11)):[137]5505
5503 :[145][171](m[177].)[137]5506:::a$[178]"sys(NULL)evelcmd:print"[170][200]("cmd",[171](lv[177]99))
5504 :a$[178]a$[170][200]("cmdcmdcmdcmdcmdcmdcmdcmdcmd",99[172][171](lv[177]999))[170][202]([196](lv),2)
5505 :p[178]9.02:[141]3400:[141]140:[145][171](a$[178]"t")[137]5507:[139]a$[178]"input"[167]:[142]:
5506 :a$[178]f$:[141]2030:[142]:
5507 :[141]5506:[129]k[178]1[164]12:[153]"sys";:a$[178]b$(k):[141]5505:k[178]k[171](a$[178]"input")[172]99:[130]:
5508 :[142]:
5509 :
5510 :[143]----anzeigtexte
5511 :b$(1)[178]"(NULL)os!cmd!cmd!cmd!cmd!cmd!"
5512 :b$(2)[178]"(NULL)pielan!"
5513 :b$(3)[178]"(NULL)illigeh"
5514 :b$(4)[178]"atnbgeht'syss"
5515 :b$(5)[178]"(NULL)osgehts"
5516 :b$(6)[178]"atnbflug!cmd!cmd!"
5517 :b$(7)[178]"ascreicmd-syscmdleft$eit"
5518 :b$(8)[178]"cmdchr$lueckonaonuonf"
5519 :b$(9)[178]"(NULL)anda.cmd.cmd."
5520 b$(10)[178]"left$ebelvor"
5521 b$(11)[178]"(NULL)troman!"
5522 b$(12)[178]"(NULL)tart.cmd.cmd.cmd."
5529 :[142]:
5600 :
5698 :
5699 :
5700 :[143]---rom to ram,screen(52224)
5701 :[151]646,[194](53281)
5702 [151]56334,.:[151]1,51:[129]i[178]88[164]91:[151]i,.:[130]:[151]781,97:[151]782,.:[158]41971
5704 [151]1,53:[151]56334,1:[151]648,204:[158]58692:[151]56576,196:[151]53272,54:[142]
5705 :
5706 :
5800 :[143]---zeichen datas
5801 :[141]112:a[178][165]l(.):[141]110:[129]j[178]1[164]6:[141]5804:[130]:[142]
5803 :
5804 :[143]----zeichen inst.
5805 :[135]n:n[178]55296[170]n[172]8:
5806 :[151]56334,.:[151]1,51:[129]i[178].[164]7:[135]a:[151]n[170]i,a:[130]:[151]1,53:[151]56334,1
5807 :[142]:
5808 :
5809 :
5812 :[131]112,,84,56,254,56,84,,:
5813 :[131]113,,,60,60,60,60,,::::
5814 :[131]114,,54,127,127,62,28,8,::
5815 :[131]115,,60,102,66,66,102,60,:
5816 :[131]116,,60,126,126,126,126,60,:
5817 :[131]117,8,28,62,127,62,28,8,:
5818 :
5819 :
5830 :[143]---figur datas
5831 :l(1)[178][165]l(.):[131],60,126,90,126,126,118,60,:[143]---minigesicht
5832 :l(2)[178][165]l(.):[131],60,118,118,8,118,118,60,:[143]---kreuz
5833 :l(3)[178][165]l(.):[131],126,126,90,90,126,118,60,:[143]---minigesicht2
5834 :[142]
5835 :
5836 :
5839 :
5931 :[153]" ascree-(NULL)oft for chr$ame-(NULL)overs"
9999 :[142]: